package Team.View.Login;

import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import javax.swing.JButton;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.UIManager;

import javax.swing.*;

public class TeamLoginView 
{

	public JPasswordField passwordField;
	public JTextField userNameTextField;
	public JFrame frame;
	public JLabel loginStatusLabel;
	
	private JLabel passwordLabel;
	private JLabel usernameLabel;
	private JLabel acmContestJudgeLabel;
	
	public JButton loginButton;
	public JButton exitButton;
	public JButton loadFileButton ;
	
	
	public static void main(String args[]) 
	{
		try
		{
		    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		
		TeamLoginView window = new TeamLoginView();
		window.frame.setVisible(true);
	}

	/**
	 * Create the application
	 */
	
	
	public TeamLoginView()
	{
		try
		{
		    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		
		createContents();
		
		frame.setVisible(true);
	}
	
	

	/**
	 * Initialize the contents of the frame
	 */
	private void createContents() 
	{
		frame = new JFrame();	
		frame.setTitle("Team Login System");
		frame.getContentPane().setFont(new Font("", Font.PLAIN, 5));
		frame.getContentPane().setLayout(null);
		frame.setBounds(100, 100, 537, 375);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		acmContestJudgeLabel = new JLabel();
		acmContestJudgeLabel.setForeground(new Color(255, 0, 0));
		acmContestJudgeLabel.setFont(new Font("", Font.PLAIN, 16));
		acmContestJudgeLabel.setText("ACM Contest Judge System");
		acmContestJudgeLabel.setBounds(116, 10, 233, 36);
		frame.getContentPane().add(acmContestJudgeLabel);

		usernameLabel = new JLabel();
		usernameLabel.setForeground(new Color(255, 0, 0));
		usernameLabel.setFont(new Font("", Font.PLAIN, 9));
		usernameLabel.setText("UserName");
		usernameLabel.setBounds(116, 98, 66, 18);
		frame.getContentPane().add(usernameLabel);

		userNameTextField = new JTextField();
		userNameTextField.setBounds(116, 122, 262, 22);
		frame.getContentPane().add(userNameTextField);

		passwordLabel = new JLabel();
		passwordLabel.setText("password");
		passwordLabel.setBounds(116, 166, 66, 18);
		frame.getContentPane().add(passwordLabel);

		passwordField = new JPasswordField();
		passwordField.setBounds(116, 190, 262, 21);
		frame.getContentPane().add(passwordField);

		loginButton = new JButton();
		loginButton.setText("Login");
		loginButton.setBounds(116, 252, 66, 23);
		frame.getContentPane().add(loginButton);

		exitButton = new JButton();
		exitButton.setText("Exit");
		exitButton.setBounds(312, 252, 66, 23);
		frame.getContentPane().add(exitButton);

		loginStatusLabel = new JLabel();
		loginStatusLabel.setBounds(116, 296, 307, 22);
		frame.getContentPane().add(loginStatusLabel);

		loadFileButton = new JButton();
		loadFileButton.setText("LoadFile");
		loadFileButton.setBounds(201, 252, 92, 23);
		frame.getContentPane().add(loadFileButton);
		
		System.out.println("here run");
	}

}
